<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
        <title>EasyUI&nbsp;Demo&nbsp;-&nbsp;ProgressBar</title>
        <link rel="shortcut icon" href="../../assets/image/favicon.ico"/>
        <script type="text/javascript" src="../../assets/js/common.js"></script>
        <link rel="stylesheet" type="text/css" href="../../assets/libs/easyui/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="../../assets/libs/easyui/themes/icon.css">
        <script type="text/javascript" src="../../assets/libs/easyui/jquery.min.js"></script>
        <script type="text/javascript" src="../../assets/libs/easyui/jquery.easyui.min.js"></script>
    </head>
    <body>
        <h1>ProgressBar&nbsp;-&nbsp;Base&nbsp;基础组件</h1>
        <fieldset>
            <legend>使用案例</legend>
            <h2>创建进度条</h2>
            <p>使用HTML标签或程序创建进度条组件。从标签创建更加简单，添加'easyui-progressbar'类ID到&lt;div/&gt;标签。</p>
            <div id="p" class="easyui-progressbar" data-options="value:60" style="width:400px;"></div>
            <p>使用Javascript创建进度条。</p>
            <div id="p1" style="width:400px;"></div>
        </fieldset>
    </body>
    <script type="text/javascript">
        $('#p1').progressbar({
            value: 67
        });
        var value = $('#p1').progressbar('getValue');
        console.log("当前进度：" + value + "%");
        $('#p1').progressbar('setValue', Math.floor(Math.random() * 100));
        $('#p1').progressbar({
            width: '350px',
            height: 35,
            text: '百分之{value}',
            onChange: function(newValue, oldValue) {
                console.log("oldValue:", oldValue);
                console.log("newValue:", newValue);
            }
        });
    </script>
</html>